﻿#ifndef COMPUTER_H
#define COMPUTER_H

#include <QMainWindow>
#include <QPushButton>
#include <QLabel>
#include <random>
#include <cmath>
#include <QRandomGenerator>
#include <algorithm>
#include <QtGlobal>
#include <QTime>
#include <QTimer>
#include <QDateTime>
#include <QMessageBox>
#include <QLabel>
#include <QVector>
#include <QString>
#include <QDebug>
#include <vector>
#include <string>
#include <QThread>
#include <QMediaPlaylist>
#include <QtMultimedia/QMediaPlayer>
#include <QSound>

using namespace std;

namespace Ui {
class computer;
}

class computer : public QMainWindow
{
    Q_OBJECT

public:
    explicit computer(QWidget *parent = nullptr);
    ~computer();
signals:

public:
    QLabel *title;
    int N;
    QPushButton* start;
    QPushButton* backgame;
    QSound *blockAudio;
    void layoutbutton(int* p,int N);
    void automove();

    int currentBlockPosition=8;
    int currentIndex = 0; // 跟踪当前移动指令的索引
    vector<string> solution;
    QTimer timer;

private:
    Ui::computer *ui;
    QPushButton* newblock;
};

#endif // COMPUTER_H
